a=set()
print(type(a))
b={1,2,3,4,3,'a','b','aa'}
print(type(b))
print(b)
#添加新元素，是无序的，用add实现
b.add("python")
print(b)
b.add("Python")
print(b)
c=(set('cheesecake'))
print(c)
#删除元素
b.remove("aa")
print(b)
m=b.pop()
print(m)
print(b)
b.discard("python")
print(b)
b.discard("Python123123")
print(b)
a.clear()
print(a)
#元素个数
print(len(b))

for element in b:
    print(element)

a={1,2,3}
b={2,3,4}
c=a.difference(b)
print(c)
d=a.intersection(b)
print(d)
e=a.symmetric_difference(b)
print(e)
f=a.union(b)
print(f)
a.difference_update(b)
print(a)